import java.util.LinkedList;

public class SingleLinkedListStub implements SingleLinkedList {
	private LinkedList<String> myImpl = new LinkedList<String>();

	public String get(int position) {
		return myImpl.get(position);
	}

	public void insert(String value, int position) {
		myImpl.add(position, value);
	}

	public void insertFirst(String value) {
		myImpl.addFirst(value);
	}

	public void insertLast(String value) {
		myImpl.addLast(value);
	}

	public boolean isEmpty() {
		return myImpl.isEmpty();
	}

	public int size() {
		return myImpl.size();
	}

	public void remove(int position) {
		myImpl.remove(position);
	}

	public void clear() {
		myImpl.clear();
	}

	public void swap(int pos1, int pos2) {
		String val1 = myImpl.get(pos1);
		String val2 = myImpl.get(pos2);
		myImpl.remove(pos1);
		myImpl.add(pos1, val2);
		myImpl.remove(pos2);
		myImpl.add(pos2, val1);
	}


}
